import styled from "styled-components";

export const ItemWrapper = styled.div`
  width: ${(props) => props.itemWidth};
  margin-bottom: 20px;
  .img {
    width: 100%;
    position: relative;
    padding-top: 60%;
    cursor: pointer;
    img {
      position: absolute;
      top: 0;
      left: 0;
      border-radius: 5px;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: all 0.2s ease-in-out;
      box-shadow: rgba(0, 0, 0, 0.18) 0px 2px 4px;
      &:hover {
        transform: scale(1.02);
      }
    }
  }
  .swiper {
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    .img {
      img {
        &:hover {
          transform: none;
        }
      }
    }
    &:hover {
      .swiper-buttons  {
        visibility: visible;
      }
    }
    .swiper-buttons {
      width: 100%;
      height: 100%;
      position: absolute;
      z-index: 1;
      display: flex;
      justify-content: space-between;
      color: #fff;
      font-size: 28px;
      visibility: hidden;
      .swiper-button {
        height: 100%;
        display: flex;
        align-items: center;
        padding: 0 15px;
      }
      .prev {
        background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent);
      }
      .next {
        background-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.4));
      }
    }
    .indicator {

    }
  }
  .tags {
    background-color: #ebebeb;
    color: ${(props) => props.verifyColor};
    font-weight: 700;
    font-size: 12px;
    padding: 2px 5px;
    margin: 10px 0;
    border-radius: 3px;
    width: max-content;
    .dot {
      margin: 0 4px;
      &:last-child {
        display: none;
      }
    }
  }
  .name {
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    margin: 10px 0;
  }
  .price {
    color: #484848;
  }
  .bottom {
    display: flex;
    align-items: center;
    .info {
      margin-left: 8px;
      font-weight: 700;
      color: #ff385c;
      .dot {
        margin: 0 2px;
      }
    }
  }
`;
